package com.example;

import com.example.config.CommonConfig;
import com.example.config.DevConfig;
import com.example.config.ProdConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.Profiles;

public class App {

    public static void main(String[] args) {
        //System.setProperty("spring.profiles.active", "dev");
        ApplicationContext context = new AnnotationConfigApplicationContext(DevConfig.class, CommonConfig.class, ProdConfig.class);
        System.out.println(context.getBean("baiduURL", String.class));
        System.out.println(context.getBean("databaseURL", String.class));
    }
}
